package domain

import (
	"time"
)

const (
	ClubDepartmentFieldMembers = "Members"
)

type ClubDepartmentStruct struct {
	ID            int64     `json:"id"`
	ClubID        *int64    `json:"-"`
	Name          string    `json:"name" gorm:"type:varchar(255);not null"`
	Description   *string   `json:"description"`
	IsDefaultJoin bool      `json:"is_default_join" gorm:"not null;default:false"`
	CreatedAt     time.Time `json:"created_at" `
	UpdatedAt     time.Time `json:"updated_at" `
	Members       []*User   `json:"members" gorm:"many2many:club_department_member"`
	Club          *Club     `json:"club" gorm:"foreignKey:ClubID;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"`
	CoverImages   []*Assets `json:"cover_images" gorm:"many2many:club_department_cover_images"`
}
type ClubDepartmentStructDTO struct {
	ID            int64        `json:"id"`
	ClubID        *int64       `json:"-"`
	Name          string       `json:"name" gorm:"type:varchar(255);not null"`
	Description   *string      `json:"description"`
	IsDefaultJoin bool         `json:"is_default_join" gorm:"not null;default:false"`
	CreatedAt     time.Time    `json:"created_at" `
	UpdatedAt     time.Time    `json:"updated_at" `
	Members       []*UserDTO   `json:"members" gorm:"many2many:club_department_member"`
	Club          *ClubDTO     `json:"club" gorm:"foreignKey:ClubID;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"`
	CoverImages   []*AssetsDTO `json:"cover_images" gorm:"many2many:club_department_cover_images"`
}
